package com.github.cakin.shiro.chapter19.web.bind.annotation;

import com.github.cakin.shiro.chapter19.Constants;

import java.lang.annotation.Target;
import java.lang.annotation.Retention;
import java.lang.annotation.Documented;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.ElementType;

/**
 * @className: CurrentUser
 * @description: 绑定当前登录的用户
 * @date: 2020/5/26
 * @author: cakin
 */
@Target({ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface CurrentUser {

    /**
     * 当前用户在request中的名字
     */
    String value() default Constants.CURRENT_USER;

}
